home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
sound
/
effect10.zip
/
EFFECT10.DOC
< prev
next >
Wrap
Text File
|
1993-11-07
|
15KB
|
320 lines
EFFECT10.EXE DESCRIPTION
------------------------
Jos Groot, November 7, 1993
This file describes the first release of the program EFFECT10, which can
be used to add real time sound effects (for example, an echo) to sound
input to a Sound Galaxy NX Pro 16 soundcard or compatible.
1. INTRODUCTION
---------------
The Sound Galaxy NX Pro 16 (SGPRO16) is a 16-bit stereo sound card. It
contains a chip, the AD1848, which can sample and playback up to 48 kHz
sample rate. EFFECT10 accesses this chip directly to create the sound
effects. It uses the chip in its mono mode.
The Microsoft Windows Sound System uses this chip also. I expect that
EFFECT10 functions with this card. However, I didn't test it. The same
holds for all other cards which claim (hardware) compatibility with the
Microsoft system, or use an AD1848. EFFECT10 uses an initialization file
which includes the IO addresses used, which probably should be changed to
use other cards (see below).
Section 5 of this file contains some additional information on the AD1848
for those interested.
The program was written in Turbo Pascal 6.0 on a 33 MHz 80386 machine,
with an ordinary IDE (AT) IO bus running at 11 MHz. All performance
figures given were measured on this machine. I expect the program to work
on all 80286 and higher IDE bus computers with a VGA card.
2. GETTING STARTED
------------------
Start EFFECT10. One of the first things the program does is trying to
detect the AD1848 of the SGPRO16. If it does, no problem. If it doesn't,
the program possibly uses the wrong IO addresses. These are read from the
configuration file EFFECT10.CFG. Page A-7 of the Sound Card User Manual
(version 1.1) of your SGPRO16 documentation contains some information on
the IO addresses used. It uses 8 contiguous bytes beginning at one of the
following base addresses WAVBase: $530 (default), $E80, $F40 or $604 (the
$ is the Turbo Pascal method for writing hexadecimal numbers). The base
address used is selected with the jumpers J6 and J7 (page I2-10 of the
User Manual). EFFECT10.CFG contains 4 addresses, because the AD1848 uses
only 4 of the 8 IO addresses. These are:
Address | Description | Default (WAVBase= $530)
-----------------------------------------------------------
WAVBase + 4H | Codec Address | $534
WAVBase + 5H | Codec Data | $535
WAVBase + 6H | Codec Status | $536
WAVBase + 7H | Codec Direct data | $537
The AD1848 is referred to as the Codec (coder/decoder) in this table. The
configuration file of this archive assumes use of the default WAVBase
address, $530. If your card is configured differently, change the four
entries in the configuration file accordingly.
3. PROGRAM OPTIONS
------------------
The main menu presents some commands which are selected by pressing the
first letter of the command. The next sections describe each of them. I
suggest that you also work through all the program options in this order.
3.1 Report configuration
------------------------
Shows the figures read from the configuration file EFFECT10.CFG, and some
other more or less useful info. Use it to check that the program read
EFFECT10.CFG correctly.
3.2 Sample rate
---------------
The AD1848 of the SGPRO16 can operate at 14 different software selectable
sample rates (frequencies), ranging from 5.5 to 48 kHz. Select one here.
Because the exact frequency depends on the crystals used, the frequency is
measured by the program. This value is used for all computations. As far
as I know, the SGPRO16 uses the crystals recommended in the AD1848
datasheets, so the 14 frequencies shown by EFFECT10 are correct. All
algorithms of the program will operate at the measured frequency.
The default sample rate can be changed in the configuration file.
3.3 Plot
--------
This option plots the signal, or its frequency spectrum. Connect your
musical instrument (for example, an electric guitar) or the microphone
supplied with your SGPRO16 to the microphone input of the card. Select the
Plot option.
The top of the screen contains the current sample rate, the x- and y-axis
range and units, and some statistical information. The y-axis range can be
changed in the configuration file ("Voltage for full ADC input"). If you
have a tone generator and an oscilloscope you can measure the correct
value. Substituting this value in the configuration file turns your sound
card into a calibrated slow digital scope. The statistical information is
the minimum, maximum, average and RMS (root-mean-square) value of the plot
below. The RMS value can be used to estimate the amount of noise when no
(or a constant) signal is input.
At the center is a plot of 640 samples. If you make your instrument sound,
or whistle into the microphone the plot should change. If it doesn't,
check the connections. If the signal is too large (small), you should
decrease (increase) the input gain entry in the configuration file.
Below the plot is a sub-menu with several options:
Statistics: turns the statistical information at the top on or off.
Decrease/Increase delay: the plot is refreshed every X seconds. The delay
X can be changed with this option.
Frequency spectrum: if you select this option a 512 point frequency
spectrum is plotted. Now you can for example see how the place at which
you hit a guitar string affects the spectral content of the sound (this
affects the timbre, not the pitch). I myself discovered that some
annoying high noise from my computer had a frequency of 9.3 kHz. The
y-direction scale factor for this plot can be altered in the
configuration file, if you wish. The statistical information now
indicates the 4 frequencies with the highest intensity. Note that the
x-direction scale changes with the sample rate: the highest spectrum
frequency is half the sample rate.
Non-continuous mode: selecting this option lets one determine when to take
and plot the samples or a spectrum ("Next frame" option). The other
options of the changes sub-menu allow you to measure the plot more
accurately and to save it to the file EFFECT10.PLT.
Main menu: returns one to the main menu.
3.4 Distortion
--------------
Now its time to get some sound output. Connect an amplifier or speaker to
the speaker/headphone connector of the SGPRO16 card. Select the Distortion
option and set the level to 0. The only thing the program does is reading
ADC sample values and feeding them to the DAC, without altering them at
all. You should now hear the sound you input to the card. If it is
distorted there are two possible causes: if the input level is too high,
adjust your instrument volume, or decrease the input gain entry in the
configuration file. If the output level is too high, adjust it with the
volume control on your card, or decrease the DAC attenuation entry in the
configuration file.
My machine is not fast enough to run this algorithm at 48 kHz. At 48 kHz
clicks are audible, because the program is sometimes too late to read a
sample from the ADC. The highest sample rate that doesn't cause this
problem is 32 kHz. If you have a very slow machine, the number of samples
it misses is so large that it causes the sound to be distorted quite
heavily.
Setting the distortion level to a level higher than 0 will create a
distorted sound. I use quite a naive algorithm. For a certain distortion
level (Level) the value input to the DAC (In) is related to the ADC output
(Out) by:
(1 - Level/10)
( ab